<template>
  <div class="guarantee">
    <div class="box">
      <div class="search">
        <Search @search-text="emit"></Search>
      </div>
      <div class="table">
        <Table :search="search"></Table>
      </div>
    </div>
  </div>
</template>

<script>
import Table from "@/views/dept/table";
import Search from "@/views/dept/search";

export default {
  name: "dept",
  components: {Table, Search},
  data() {
    return {
      search: {
        name: null,
        start: 0,
        end: 10
      }
    }
  },
  methods: {
    emit(value) {
      this.search.name = value.name
    }
  }
}
</script>

<style scoped lang="scss">

.guarantee {
  width: 100%;
  height: 100%;

  .box {
    margin: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;

  }
}

</style>